
{extend name="common/public" /}
{block name="content"}

<div class="widget-body am-fr">
    <div class="am-form-group">
        <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs">
                <button type="button" onclick="openUrl('{:url("addjoin")}')" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增加盟商</button>
            </div>
        </div>
    </div>
</div>

<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
    <div class="widget am-cf">
        <div class="widget-head am-cf">
            <div class="widget-title am-fl">加盟管理</div>
            <div class="widget-function am-fr">
                <a href="javascript:;" class="am-icon-cog"></a>
            </div>
        </div>
        <div class="widget-body  widget-body-lg am-fr">

            <table width="100%" class="am-table am-table-compact am-table-bordered tpl-table-black ">
                <thead>

                <tr>
                                            <th class="am-lg-text-center">
                                                        id                                                        </th>
                                            <th class="am-lg-text-center">
                                                        电话号码</th>
                                            <th class="am-lg-text-center">
                                                        加盟商名字</th>
                                            <th class="am-lg-text-center">
                                                        管理区域</th>
                    <th class="am-lg-text-center">
                        是否锁定</th>
                    <th class="am-lg-text-center">
                        登录地址</th>
                                            <th class="am-lg-text-center">
                                                        创建时间</th>
                                        <th>操作</th>
                </tr>
                </thead>
                <tbody>
                
                    {foreach $list as $v}
                
                <tr class="gradeX">
                    <td class='am-lg-text-center'>                                {$v.id}</td>
                        
                    <td class='am-lg-text-center'>                                {$v.username}</td>
                        
                    <td class='am-lg-text-center'>                                {$v.nickname}</td>
                    <td class='am-lg-text-center'>                                {$v.region_name}</td>
                    <td class='am-lg-text-center'>
                        <div class="tpl-switch" style="text-align: center">
                            <input type="checkbox" name="is_lock" class="ios-switch bigswitch tpl-switch-btn am-margin-top-xs" {present
                                   name='$v.is_lock' }{eq name='$v.is_lock' value="1" }checked{/eq} {/present}>
                            <div class="tpl-switch-btn-view">
                                <div></div>
                            </div>
                        </div>
                    </td> 
                    <td class="am-lg-text-center">
                        {php}$n = str_replace("admin","join",request()->domain().url("login/login"));{/php}
                        <a href="{$n}" target="_blank">{$n}</a>

                    </td>
                    <td class='am-lg-text-center'>                                {$v.create_time}</td>

                                <td>
                            
                            <div class="tpl-table-black-operation">
                                <a onclick="openUrl('{:url('edit',['id'=>$v['id']])}')">
                                    <i class="am-icon-pencil"></i> 编辑
                                </a>
                                <a onclick="rms(this,'{:url('del')}',{$v.id})" class="tpl-table-black-operation-del">
                                    <i class="am-icon-trash"></i> 删除
                                </a>
                            </div>
                            
                        </td>

                </tr>
                
                    {/foreach}
                


                </tbody>
            </table>
            
                {$list|raw}
            
        </div>
    </div>
</div>

    {/block}

    {/extend}
